{extend name='admin@main'}

{block name="button"}
<!--{if auth("store/cleaner/add")}-->
<button data-modal='{:url("add")}' data-title="添加保洁员" class='layui-btn layui-btn-sm layui-btn-primary'>添加保洁员</button>
<!--{/if}-->
<!--{if auth("store/cleaner/remove")}-->
<button data-action='{:url("remove")}' data-rule="id#{key}" class='layui-btn layui-btn-sm layui-btn-primary'>删除保洁员</button>
<!--{/if}-->
{/block}

{block name="content"}
<div class="think-box-shadow">
    <table class="layui-table margin-top-10" lay-skin="line">
        {notempty name='list'}
        <thead>
        <tr>
            <th class='text-left nowrap'>保洁员信息</th>
            <th class='text-left nowrap'>距离</th>
            <th></th>
        </tr>
        </thead>
        {/notempty}
        <tbody>
        {foreach $list as $key=>$cleaner}
        <tr data-dbclick>
            <td class='text-left nowrap'>
                {notempty name='cleaner.headimg'}
                <img data-tips-image style="width:40px;height:40px;vertical-align:top" src="{$cleaner.headimg|default=''}" class="margin-right-5">
                {/notempty}
                <div class="inline-block">
                    会员姓名：{$cleaner.name|default='--'}<br>
                    会员手机：{$cleaner.phone|default='--'}<br>
                </div>
            </td>
            <td class='text-left'>{$cleaner.distance}米</td>
            <td class="text-left">
                {if auth("currency/order/edit")}
                <a class="layui-btn layui-btn-sm" data-confirm="确定操作吗？" data-action="{:url('edit')}" data-value="id#{$vo.id};cid#{$cleaner.id}" data-csrf="{:systoken('currency/cleaner/edit')}">分 单</a>
                {/if}

            </td>
        </tr>
        {/foreach}
        </tbody>
    </table>
    {empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}
</div>
{/block}